<?php
	get_header();
        $args = array(
            'post_type' => 'store',
            'post_status' => 'publish',
            'posts_per_page' => -1
        );
        $query = new WP_Query($args);
        $store = $query->posts;
?>
<div id="all-deals">
    <h1 id="inner-title">Companies</h1>
    <hr/>
    <div class="store-list">
        <?php 
            foreach ($store as $st){
                $st_id = $st->ID;
                $store_name = get_the_title($st_id);
                $store_logo = get_post_meta($st_id,'logo_metadata',true);
                $permalink = get_permalink($st_id);
                ?>
        <ul class="single-store">
            <li>
                <span class="image-wrap">
                    <a href="<?php echo $permalink; ?>" title="<?php echo $store_name; ?>">
                        <img src="<?php echo $store_logo;?>" title="<?php echo $store_name;?>"/>
                    </a>
                </span>
                <div class="recent-deal-title">
                    <a href="<?php echo $permalink; ?>" title="<?php echo $store_name; ?>"><?php echo $store_name; ?></a>
                </div>
            </li>
        </ul>
            <?php }
        ?>
    </div>
</div>
<?php
	get_footer();
?>